import { Modal, Button } from 'antd';
import React from 'react';
import SearchTime from './SearchTime';
import { LineChart } from '../../components';

class ModalShow extends React.Component {
  state = {
    visible: this.props.visible,
    title: this.props.title,
    keys: this.props.keys,
    msg: this.props.msg,
  }
  showModal = () => {
    this.setState({
      visible: true,
    });
  }
  handleOk = () => {
    this.setState({
      visible: false,
    });
  }
  handleCancel = () => {
    this.setState({
      visible: false,
    });
  }
  render() {
    console.log(this.props);
    return (
      <div>
        <Modal
          width={1000}
          visible={this.state.visible}
          title={this.state.title}
          onOk={this.handleOk}
          onCancel={this.handleCancel}
          footer={null}
        >
          <div>
            <SearchTime dispatch={this.props.dispatch} keys={this.state.keys} />
            <LineChart
              msg={this.state.LineChart_money}
              stys={{ width: 800, height: 400 }}
            />
          </div>
        </Modal>
      </div>
    );
  }
}


export default ModalShow;

